package com.java;

public class TryCatchFinallyTests {

    static int doMethod1(int a,int b){
        int c=0;
        try{
            c=a/b;
        }catch (Exception e){
            return -1;
        }finally {
            return -2;
        }
    }

    public static int doMethod2(int a){
        try{
            a++;
            return a;//11
        }catch(Exception e){
            a++;
            return a;
        }finally {
            a++;//12
        }
    }

    public static void main(String[] args) {
        int result=doMethod1(10, 0);
        System.out.println(result);
        result=doMethod2(10);
        System.out.println(result);
    }
}
